Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run both cms and package migrations in upgrader #17575

Open
wants to merge 2 commits into
base: v13/dev
Choose a base branch
from

Conversation

nikolajlauridsen
Copy link
Contributor

Fixes #17436

The problem was that the upgrader only ever ran either CMS upgrades or package upgrades, this has been updated so both are run if needed.

Not that the CMS and package upgrades run in their own separate scopes, so it's safe to do it in a single notification handler 😄

Testing

Add both a CMS NoopMigration in UmbracoPlan and a package plan, unable unattended upgrades, and ensure both are run if needed.

Example package migration plan

using Umbraco.Cms.Core.Packaging;
using Umbraco.Cms.Infrastructure.Migrations;

namespace Umbraco.Cms.Web.UI;

public class MyMigrationPlan : PackageMigrationPlan
{
    public MyMigrationPlan() : base("MyPackage")
    {
    }

    protected override void DefinePlan() {
        To<NoopMigration>(Guid.Parse("AD8AF4BF-9AE1-42BC-9709-CA64891BA92D"));
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants